Computer systems and computing devices may use intermediate memory units or storage areas to store data temporarily and to speed-up various operations. An Intermediate Memory (IM) may include any memory or storage area, for example, a level-1 cache memory. Often, an IM may store data for short periods of time, until such data is copied from the IM to a longer-term memory or storage area, for example, a level-2 or higher cache memory or a system memory, which may be referred to as a Reference Memory (RM). Often, an IM may be accessed more quickly and more readily than a RM. During operation, a computerized system or processor may access the IM, thereby avoiding time-consuming access to the RM. From time to time, or upon a specific request by an application, an update operation may be performed to update the RM with changed values stored temporarily in the IM.
During operation of a processing system, the IM may be written and re-written with new data, thereby creating a discrepancy between data stored in the IM and data stored in the RM. This discrepancy may increase in time, for example, if the RM is not accessed and/or not updated frequently. The discrepancy in data between the IM and the RM may be problematic or undesired, for example, when an application requires updating the RM with accumulated changes at specific times, which may require a long processing time.
A system may prevent overloading due to unnecessary data transfers by copying data from the IM to the RM only as needed for proper data utilization, for example, when a need arises for a device to access a shared section of the RM that may have been modified in the IM, or upon eviction of the IM due to storage limitations. Problems may arise when an application or other circumstances require updating of the RM with accumulated changes at a certain point in time, for example, when a need arises to “flush” a cache memory, i.e., to transfer or copy all the content of the cache memory and empty or otherwise free the entire cache memory. Since entries in the IM may have been changed unpredictably, to ensure a complete update of the RM, there may be a need to search through the IM for updated entries or copy the entire content of the IM to the RM. Each of these alternatives may require significant processing time and may drain management resources, system power and/or system bandwidth.
It will be appreciated that for simplicity and clarity of illustration, elements shown in the figures have not necessarily been drawn to scale. For example, the dimensions of some of the elements may be exaggerated relative to other elements for clarity. Further, where considered appropriate, reference numerals may be repeated among the figures to indicate corresponding or analogous elements.